#include <bits/stdc++.h>
using namespace std;
using ll=long long;
ll f[45];
int main(){
    f[1] = 1;
    f[2] = 1;
    for(int i = 3; i < 45; i++){
        f[i] = f[i-1] + f[i-2];
    }
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        cout <<f[n] << endl;
    }
}
